package cn.wizzer.app.user.modules.models;

import cn.wizzer.framework.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import org.nutz.integration.json4excel.annotation.J4EIgnore;

/**
 * 用户认证申请记录表
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table
@TableIndexes({@Index(name = "INDEX_CT_AT", fields = {"ctAt"}, unique = false)})
public class UserCertify extends BaseModel {
    @Column
    @Name
    @Comment("ID")
    @J4EIgnore
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(uu32 = true)
    private String id;

    @Column
    @Comment
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String userId;

    @Column
    @Comment("真实姓名")
    @ColDefine(type = ColType.VARCHAR, width = 16)
    private String realName;

    @Column
    @Comment("身份证")
    @ColDefine(type = ColType.VARCHAR, width = 18)
    private String idCard;

    @Column
    @Comment("微信号")
    @ColDefine(type = ColType.VARCHAR, width = 16)
    private String weChatId;

    @Column
    @Comment("附带内容")
    @ColDefine(type = ColType.TEXT)
    private String content;

    @Column
    @Comment("创建时间")
    @PrevInsert(els = @EL("$me.now()"))
    private Long ctAt;

    @Column
    @Comment("状态：0待审核1通过-1失败")
    @ColDefine(type = ColType.INT,width = 1)
    private Integer status;
}
